<?php
$id         = gpc_getIntPost('id',$id);

if($actPost=='update')
{
    $listid 		= gpc_getStringArray("listid");
	$listfieldname 	= gpc_getStringArray("listfieldname");
	$listdescription= gpc_getStringArray("listdescription");
	
	$properties		= array();
	$count			= count($listid);
	for($i=0;$i<$count;$i++)
	{	
	   if(empty($listfieldname[$i]))
       {
            continue;
       }
		$properties[]	= array($listid[$i],$listfieldname[$i],$listdescription[$i],"");;
	}
    //print_r($properties);exit;
	savePropertyProduct($properties,$id);
	
	$msg = "Save property product Success !";
	page_transfer($msg,getUrlBack());
}


$category   = LoadCategoryById($id);
$fields     = getPropertyProduct($id);
?>
